package com.jianneng.jdg.model.adapter;

import java.util.ArrayList;
import java.util.List;

import com.example.com.jianneng.jdg.R;
import com.jianneng.jdg.model.user.MyTeamInfo;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ReprotMoneyAdapter extends BaseAdapter {
	private Context context;
	private List<MyTeamInfo> list = new ArrayList<MyTeamInfo>();
	private LayoutInflater mInflater;
	public ReprotMoneyAdapter(Context context,List<MyTeamInfo> list) {
		mInflater = LayoutInflater.from(context);
		this.list = list;
		this.context = context;
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@SuppressLint("ViewHolder")
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		View view = mInflater.inflate(R.layout.reportmoney_listview, null);
		TextView myteam_name = (TextView) view.findViewById(R.id.myteam_name);
		MyTeamInfo info = list.get(position);
		myteam_name.setText(info.team_name);
		return view;
	}

}
